1.) wordcount3.c | Count words that are input from the keyboard and count the number of times the words are repeated using a binary tree. |
2.) btree.c | Input one letter at a time. They are sorted using a binary tree. To stop the program press enter without a character. When finished the characters are printed on the screen in sorted order. Try entering your name. |
3.) slist.c | Single Linked List with a structure and pointers. The structure is passed to a function using a pointer to the structure. Global variables can also be used for the pointers to the structure. These are not passes as parameters to the functions. The program contains two functions, inputs() and slstore(). One is used to input the addresses, and the other one creates a single linked list. Prototypes are used in Borland C++ to define the function parameters, and the return variables. Pointers to structures can be passed as parameters or returned to the calling function. Functions are called by reference. |
4.) slist4.c | This program has a single linked list, a structure for the addresses, and several functions. A switch statement is used to call the functions. A switch statement can have other statements imbedded in it like an if-else statement. The functions include input, delete, search, list, load, and save. After the addresses are entered, they can be saved to a file before you close the program. Then, when the program is started again, you can load all the addresses that were saved. I created a tab delimited file when the addresses are saved. Tab delimited files can be imported into other databases like MySQL or Microsoft SQL. The End-of-file marker, EOF, is saved to the file after all the addresses are stored. |
5.) dlist.c | This program has a structure for the addresses with a double linked
list. If you draw a diagram of the nodes, it is
easier to see what logic needs to be created. Use a node and pointer
diagram to see how additions and deletions are done. |
6.) swap.c | This program swaps two integers by using their pointers that are
passed to a function. |
7.) rchar.c | This program reads and writes a text file one character at a time.
In this case the text file is the program itself. Compile, link, and run
the program with a previously created function. A header file and a
function are included in this program. They are 'gets.h' and and
'gets.c'. Use the following commands to compile, link, and run the
program: bcc32 -c gets.c bcc32 rchar.c gets.obj rchar rchar.c |
8.) filter.c | This program shows how to redirect input and output from the
keyboard to a file. Less than and greater than signs are used for
redirection. The command following command does the trick. filter <
filter.c > newfile.txt The compiled program, filter, reads the file,
'filter.c', and writes it to the file, 'newfile.txt'. |
9.) alias.c | Print the characters from 'A' to 'Z' using a for loop. An Integer
take more space than a character. Four bytes are used for an integer
while only one is used for a character. |
10.) introduction.txt | Setup Borland C++ 5.5 for Windows 10 |
11.) quad.c | Find the roots for a quadratic equation, y = Ax**2 + B*x + C. R1 and
R2 are the roots. |
12.) bsorter.c | bsorter.c is from page 218 in Borland C++ 4.5 by Tom Swan. This program uses a random number generator to create a hundred numbers and then sorts them using the BubbleSort. I copied the BubbleSort from a Pascal program on page 278 of Pascal Programming and Problem Solving by Sanford Leestma and Larryk Nyhoff. |
13.) factorial.c | Calculates the factorial of an integer that is entered from the
keyboard. Two functions are used in the program. One uses recursion, and the other one does not. |